<%@ page pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<html>
<head>
	<title>我的资料</title>
</head>
<body>
	<h3>我的资料</h3>
<div style = "background: url(../images/menuBg.png) repeat fixed; height:420px">
	<form id="form">
		<input type="hidden" name="id" value="${user.id}"/>
		<div class="content_row">
			<span class="row"><label>工号：</label>${user.jobNumber}</span>
			<span class="row"><label>用户名：</label>${user.username}</span>
			<span class="row"><label>姓名：</label>${user.name}</span>
		</div>
		<div class="content_row">
			<span class="row"><label>部门：</label>${dept.name}</span>
			<span class="row"><label>电话</label><input type="text" name="telephone" value="${user.telephone}"/></span>
			<span class="row"><label>邮箱</label><input type="text" name="email" value="${user.email}"/></span>
		</div>
		<div id="pwd" class="content_row" style="display: none;">
			<span class="row"><label>旧密码</label><input type="password" name="password"/></span>
			<span class="row"><label>新密码</label><input type="password" name="password1"/></span>
			<span class="row"><label>再次输入新密码</label><input type="password" name="password2"/></span>
		</div>
		<div class="content_row content_row_btn">
			<a href="javascript:void(0)" onclick="modifyPwd();" class="commonbtn">修改密码</a>
			<a href="javascript:void(0)" onclick="submitForm('/user/updateUserPassword.do');" class="commonbtn">保存</a>
			<a href="javascript:void(0)" onclick="openUrl('/home/welcome.do');" class="commonbtn">返回</a>
		</div>
	</form>
</div>
<script type="text/javascript">
	$(function(){
		$('#deptId').combotree({
		    url: '/user/getDeptTree.do',
		    onLoadSuccess:function(){
		    	$('#deptId').combotree('setValue', '${user.deptId}');
		    }
		});
	});
	function modifyPwd(){
		$('#pwd').show();
	}
</script>
</body>
</html>
